import './assets/main.css'
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import App from './App.vue'
import router from './router'
import { 
    Button, 
    Icon, 
    NavBar, 
    Cell, 
    CellGroup, 
    Image as VanImage, 
    Loading,
    Tabbar,
    TabbarItem,
    Toast,
    Dialog,
    Field,
    Form,
    Checkbox,
    CheckboxGroup,
    Search,
    Grid,
    GridItem,
    List,
    PullRefresh,
    DropdownMenu,
    DropdownItem
} from 'vant'
import 'vant/lib/index.css'

// 创建Pinia状态管理
const pinia = createPinia()

// 创建Vue应用
const app = createApp(App)

// 使用插件
app.use(pinia)
app.use(router)

// 注册Vant组件
app.use(Button)
app.use(Icon)
app.use(NavBar)
app.use(Cell)
app.use(CellGroup)
app.use(VanImage)
app.use(Loading)
app.use(Tabbar)
app.use(TabbarItem)
app.use(Toast)
app.use(Dialog)
app.use(Field)
app.use(Form)
app.use(Checkbox)
app.use(CheckboxGroup)
app.use(Search)
app.use(Grid)
app.use(GridItem)
app.use(List)
app.use(PullRefresh)
app.use(DropdownMenu)
app.use(DropdownItem)

// 挂载应用
app.mount('#app') 